<template>
  <el-card style="margin-bottom:20px;">
    <div slot="header" class="clearfix">
      <span>个人信息</span>
    </div>

    <div class="user-profile">
      <div class="box-center">
        <!--        <pan-thumb :image="user.img" :height="'100px'" :width="'100px'" :hoverable="false">-->
        <!--        <div>Hello</div>-->
        <!--          {{ user.role }}-->
        <!--        </pan-thumb>-->
      </div>
      <div class="box-center">
        <!--        <pan-thumb :height="'100px'" :width="'100px'" :hoverable="false" prop="img" :image="userInfo.img">-->
        <img width="150px" :src="'http://'+userInfo.img" alt="头像">
        <div class="user-name text-center">{{ userInfo.name }}</div>
        <div class="user-role text-center text-muted">role: {{ userInfo.role }}</div>
        <!--        </pan-thumb>-->
      </div>
    </div>

    <div class="user-bio">
      <div class="user-education user-bio-section">
        <div class="user-bio-section-header"><svg-icon icon-class="education" /><span>登陆方式</span></div>
        <div class="user-bio-section-body">
          <div class="text-muted">
            {{ userInfo.state }}
          </div>
        </div>
      </div>

      <div class="user-skills user-bio-section">
        <div class="user-bio-section-header"><svg-icon icon-class="skill" /><span>信息</span></div>
        <div class="user-bio-section-body">

          <div class="progress-item">
            <span>邮箱：  {{ userInfo.email }}</span>
          </div>
          <div class="progress-item">
            <span>手机号：  {{ userInfo.phone }}</span>
          </div>
          <div class="progress-item">
            <span>创建账号时间：{{ userInfo.createTime }}</span>
          </div>
          <div class="progress-item">
            <span>更改账号时间：{{ userInfo.updateTime }}</span>
          </div>
          <!-- <div class="progress-item">
            <span>当前时间：{{ nowDate }}</span>
          </div> -->

        </div>
      </div>
    </div>
  </el-card>
</template>

<script>
import { mapGetters } from 'vuex'
// import PanThumb from '@/components/PanThumb'

export default {
  computed: {
    ...mapGetters([
      'userInfo'
    ])
  },
  created() {
  }

}

</script>

<style lang="scss" scoped>
.box-center {
  text-align: center;
}

.text-muted {
  color: #777;
}

.user-profile {
  .user-name {
    font-weight: bold;
  }

  .box-center {
    padding-top: 10px;
  }

  .user-role {
    padding-top: 10px;
    font-weight: 400;
    font-size: 14px;
  }

  .box-social {
    padding-top: 30px;

    .el-table {
      border-top: 1px solid #dfe6ec;
    }
  }

  .user-follow {
    padding-top: 20px;
  }
}

.user-skills {
  .progress-item {
    margin-bottom: 30px;
  }
}

.user-bio {
  margin-top: 20px;
  color: #606266;

  span {
    padding-left: 4px;
  }

  .user-bio-section {
    font-size: 14px;
    padding: 15px 0;

    .user-bio-section-header {
      border-bottom: 1px solid #dfe6ec;
      padding-bottom: 10px;
      margin-bottom: 10px;
      font-weight: bold;
    }
  }
}
</style>
